home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 2⁄2⁄90 / 0047-Re DoToField_StaticL-Feb90 < prev    next >
Encoding:
Text File  |  1990-02-02  |  2.2 KB  |  63 lines  |  [TEXT/GEOL]

  1. Item    5877133                         2-Feb-90        19:05PST
  2.  
  3. From:   MOOF                            Rollin, Keith A
  4.  
  5. To:     CPLUS.APPLE$                    C++ Interest List--Apple Employees
  6.         CPLUS.DEV$                      C++ Interest List--Developers
  7.  
  8. Sub:    RE>DoToField_StaticLink ?
  9.  
  10. Attn: Nerdworks, Dan Weston,PRT
  11. SentBy: Keith Rollin
  12. Date   2/2/90
  13. Subject    RE>DoToField_StaticLink ???
  14. From   Keith Rollin
  15. To Nerdworks, Dan Weston,PRT
  16.  
  17.          Reply to:   RE>DoToField_StaticLink ???
  18. Folks,
  19.  
  20. In the next batch of Macintosh technotes, there will be one that talks
  21. in-depth about the Static Link parameter, and how to use it. This will be
  22. technote #265. I'd post it here, but I don't have the final version yet. Since
  23. the technotes will be released in a week or two, and can be downloaded from
  24. AppleLink, I'd rather wait until then than pass out a pre-release note.
  25.  
  26. Instead, here is a code sample from the technote that *SHOWS* what to do, but
  27. it doesn't explain anything. Hopefully, you can work by example until the
  28. final technotes come out.
  29.  
  30. typedef pascal void (*FieldProcPtr) (StringPtr fieldName, Ptr fieldAddr,
  31.                                      short fieldType, void
  32. *DoToField_StaticLink);
  33.  
  34. pascal void CallDoToField(StringPtr, Ptr, short, void *, FieldProcPtr)
  35.    = {
  36.        0x205F,     // MOVEA.L    (A7)+,A0      ; get the DoToField pointer
  37.        0x4A97,     // TST.L      (A7)          ; check the StaticLink
  38.        0x6602,     // BNE.S      *+$0004       ; if non-zero, keep it in
  39.        0x588F,     // ADDQ.L     #$4,A7            ; if zero, pull it off
  40.        0x4E90          // JSR        (A0)          ; Call DoToField
  41.        };
  42.  
  43. pascal void TJustCommand::Fields(FieldProcPtr DoToField, void
  44. *DoToField_StaticLink)
  45. {
  46.    CallDoToField("\pTJustCommand", NULL, bClass, DoToField_StaticLink,
  47. DoToField);
  48.    CallDoToField("\pfTEView", (Ptr) &fTEView, bObject, DoToField_StaticLink,
  49. DoToField);
  50.    CallDoToField("\pfOldJust", (Ptr) &fOldJust, bInteger,
  51. DoToField_StaticLink, DoToField);
  52.    CallDoToField("\pfNewJust", (Ptr) &fNewJust, bInteger,
  53. DoToField_StaticLink, DoToField);
  54.    inherited::Fields(DoToField, DoToField_StaticLink);
  55. }
  56.  
  57.  
  58.  
  59. - Keith Rollin
  60. - Apple Developer Technical Support
  61.  
  62.  
  63.